package net.suncaper.psychological.model.domain;

import lombok.Getter;
import lombok.Setter;
import java.sql.Timestamp;

@Getter
@Setter
public class VisitRecord {
    private Long id;
    private Long appointment_id;
    private Long visitor_id;
    private String type;
    private Timestamp visit_time;
    private String risk_level;
    private String problem_type;
    private String conclusion;
    private String note;
    private String student_id;
    private String student_name;
    public String getStudent_name() { return student_name; }
    public void setStudent_name(String student_name) { this.student_name = student_name; }

    public void setVisit_time(Object visit_time) {
        if (visit_time instanceof java.sql.Timestamp) {
            this.visit_time = (java.sql.Timestamp) visit_time;
        } else if (visit_time instanceof java.util.Date) {
            this.visit_time = new java.sql.Timestamp(((java.util.Date) visit_time).getTime());
        } else if (visit_time instanceof String) {
            try {
                this.visit_time = java.sql.Timestamp.valueOf((String) visit_time);
            } catch (Exception e) {
                this.visit_time = null;
            }
        } else {
            this.visit_time = null;
        }
    }
} 